<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>自定义封装js</title>
    <script src="js/a.js"></script>
    <script>
        window.onload=function (){
            // var div=document.getElementById("ele_div");
            // alert(div.innerHTML);
            // var div2=selector("ele_div");
            // alert(div2.innerHTML);
            var div3=$("ele_div2");
            alert(div3.innerHTML);
        }
    </script>
</head>
<body>
    <div id="ele_div">
      何以解忧：唯有干饭
    </div>
    <div id="ele_div2">
        何以解忧：唯有干饭 div div  一些文本
    </div>
</body>
</html>